package homework12月9号补交.homework2.d6;

import java.lang.reflect.Method;
import java.util.Scanner;

public class test {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入：");
        String str = sc.next();
        Class<?> aClass = Class.forName(str);
        Method showString = aClass.getDeclaredMethod("showString",String.class);
        showString.setAccessible(true);
        Object o = aClass.newInstance();
        showString.invoke(o,str);
    }
}
